<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>

	<div>
	  <table>
	   <tr>
	   		<td class="td1" style="width:5px">&nbsp;</td><td class="sub-title">Sponsor Information</td>
	   </tr>
	  </table>
	</div>
	<div>

	<hr />

  <s:if test="sponsorList.size != 0" >
	<s:form action="save" namespace="/childSponsor" method="post" id="childSponsorForm" >
	  <table style="margin-top: 10px" width="100%" id="commonTable" class="blueTbl">
	    <s:actionerror/>
	    <s:hidden name="childSponsor.id" />
		<s:hidden name="childSponsor.child.id" value="%{childId}"/>
		<s:hidden name="operationMode"/>
		<tr>
	  		<th style="width:50px">&nbsp;</th><th>Name</th><th>Mobile</th><th>Email</th><th>Address</th>
	  	</tr>
		<s:iterator value="sponsorList" status="rowIndex">
		  <tr>
		    <td><table><s:label value="%{#rowIndex.index + 1}" /></table></td>
		 	<td><table><s:checkbox name="sponsorIdStringList" label="%{name}" fieldValue="%{id}"></s:checkbox></table></td>
		 	<td><table><s:label value="mobie" /></table></td>
		 	<td><table><s:label value="email" /></table></td>
		 	<td><table><s:label value="address" /></table></td>
		  </tr>
		</s:iterator>

		<tr>
		   <td></td>
		   <td>
		     <table>
		  		<sj:submit value="SUBMIT" targets="childSponsorResultDiv" cssStyle="margin-left:10px"/>
		  	 </table>
		   </td>
		   <td colspan="3"></td>
		</tr>
	  </table>
	</s:form>
 </s:if>
 <s:else>
 	There is no sponsor in the list. Please add sponsors from the settings-user-add sponsor
 </s:else>
</div>